home *** CD-ROM | disk | FTP | other *** search
- INPPLS.C Written by: Steve Higgins
- 1660 Hillcrest Ln.
- Aston, PA 19014
- Written for MSC 4.0
-
- Inppls is an input routine for 'C'. The input routine allows each key
- stroke to be masked. The source for inppls has been included. You may do
- what ever you want with it. If you have any comments feel free to contact
- me.
- For extra help in creating data entry screens try down loading FORMGEN.
- This program will allow you to paint a data entry screen and then it will
- create the source code for you.
-
-
- Calling sequence:
-
- inppls(row, col, attr, storage, options, mask, keys);
-
- row => Starting row for input line.
- col => Starting column for input line.
- attr => Color attribute for input line.
- storgae => May be either char array or int (for now).
- options => Char string containg any of the below options.
- Pch => Pad character. Default is underline.
- Hch => Hidden field. Will use ch as display char.
- l => Left justify field when enter is pressed.
- L => Left entry.
- r => Right justify field when enter is pressed. (default)
- R => Right entry. (default)
- N => Numeric input.
- D => Display field only.
- mask => Char string contaning any (and many) of the below options.
- 1 => That char is numeric input only.
- 2 => That char is alpha only.
- 3 => That char is either alpha or numeric.
- 4 => Any thing can be typed for that char.
- (ascii 255)n,ch => n = number of occurences of ch. (see example 4)
- ch => If ch is none of the above nothing will be typed
- at that position. (see examples)
- keys => Char string contaning scan codes of keys that will exit
- the input routine on that field.
-
- Examples:
-
- ex1.
- char phone[11];
- inppls(12,12,14,phone,"","(111) 111-1111","");
-
- /* start input at row 12, col 12, in color yellow */
- /* will only allow typing on numeric fields in the mask */
-
- ex2.
- int dollar;
- inppls(10,1,7,&dollar,"NLl","$11.11","");
-
- /** "NLl" - N declares numeric field.
- - L left entry.
- - l left justify. */
-
- ex3.
- char string[21];
- inppls(10,10,76,string,"","44444444444444444444","");
-
- /* input a string of any 20 characters
- - scan code for ESC key. If esc is pressed while on this field
- the routine will return that code.
-
- ex4.
- char string[21];
- inppls(10,10,76,string,""," 20,4","");
- ^
- An ascii 255. Used Alt + numeric keypad.
-
- /* exact same as above !!! */
-
- ex5.
- char mix[9];
- inppls(10,10,4,mix,"P@l","11223344",";");
-
- /** Pad with @ instead of default _
- Allow some of each mask type to be entered
- Allow exit on ESC () and F1 (;). **/
-
- ex6.
- char hidden[5];
- inppls(10,10,10,hidden,"H#","4444","");
-
- /** Use # instead of displaying the actual key **/
-
- ex7.
- char date[7];
- inppls(1,1,4,date,"D","11/11/11","");
-
- /** Just display the date using the mask. NO INPUT **/